<template>
	<view class="container">
		<view class="nav-bar">
			<view class="back-btn" @click="goBack">←</view>
			<view class="page-title">老人信息</view>
			<view class="empty-box"></view>
		</view>

		<view class="info-list">
			<view class="info-item">
				<view class="label">姓名</view>
				<view class="text">张** </view>
			</view>
			<view class="info-item">
				<view class="label">年龄</view>
				<view class="text">89</view>
			</view>
			<view class="info-item">
				<view class="label">性别</view>
				<view class="text">女</view>
			</view>
			<view class="info-item">
				<view class="label">联系电话</view>
				<view class="text">15882214000</view>
			</view>
			<view class="info-item">
				<view class="label">紧急联系人</view>
				<view class="text">张XX</view>
			</view>
			<view class="info-item">
				<view class="label">紧急电话</view>
				<view class="text">15882214000</view>
			</view>
			<view class="info-item">
				<view class="label">病历</view>
				<view class="text">糖尿病、高血压、冠心病</view>
			</view>
			<view class="info-item drug-note">
				<view class="label">用药注意</view>
				<view class="text">早上 7:00：降压药 1 片（空腹）,中午 12:30：降糖药 1 片（饭后 30 分钟）晚上 8:00：降脂药 1 片（睡前）忌辛辣、高糖、高盐食物</view>
			</view>
		</view>
	</view>
	<navigator class="edit-btn" @click="modift" url="/pages/regularUser/goto/my/mygoto/ModiftEldaerlyInformation" hover-class="edit-btn-hover">修改老人信息</navigator>
</template>

<script>
	export default {
		data() {
			return {};
		},
		onLoad() {
		},
		methods: {
			goBack(){
				uni.navigateBack();
			},
			modift(){
				uni.navigateTo({
					url:"/pages/elderlyInterface/goto/modift"
				});
			}
		}
	};
</script>

<style scoped>
	.container {
		padding-bottom: 20rpx;
		background-color: #fff9f2;
		min-height: 90vh;
	}

	.nav-bar {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 80px;
		background-color: #fff;
		position: relative;
	}

	.back-btn {
		position: absolute;
		left: 30rpx;
		font-size: 40rpx;
		color: #ff9a61;
		text-decoration: none;
	}

	.page-title {
		font-size: 32rpx;
		font-weight: 600;
		color: #e67e22;
	}

	.empty-box {
		width: 40rpx;
	}
	.info-list {
		margin: 30rpx;
		background-color: #fff;
		border-radius: 16rpx;
		padding: 40rpx;
	}
	.info-item {
		display: flex;
		padding: 28rpx 0;
		border-bottom: 1rpx solid #fff2e6;
	}

	.info-item:last-child {
		border-bottom: none;
	}

	.label {
		width: 150rpx;
		font-size: 28rpx;
		color: #e67e22;
		font-weight: 500;
	}

	.text {
		flex: 1;
		font-size: 28rpx;
		color: #333;
		line-height: 44rpx;
	}

	.drug-note .text {
		display: flex;
		flex-direction: column;
		gap: 18rpx;
		color: #444;
	}
	.edit-btn {
		/* display: block; */
		width: calc(100% - 30px);
		margin: 0 auto;
		padding: 14px 0;
		background-color: #ff7d00;
		color: #fff;
		border-radius: 12px;
		font-size: 16px;
		text-align: center;
		box-shadow: 0 4px 12px rgba(255, 125, 0, 0.15);
	}
	
	/* .edit-btn-hover {
		opacity: 0.9;
		transform: scale(0.98);
	} */
</style>